<script type="text/javascript" src="/{{=request.application}}/static/jquery.js"></script>
<!--<script type="text/javascript" src="/{{=request.application}}/static/avim.js"></script>-->
<script type="text/javascript" src="/{{=request.application}}/static/documentation.js"></script>
<script type="text/javascript" src="/{{=request.application}}/static/jquery.MetaData.js"  language="javascript"></script>
<!--<script type="text/javascript" src="/{{=request.application}}/static/jquery.rating.js" language="javascript"></script>-->
<!--<link rel="stylesheet" type="text/css" href="/{{=request.application}}/static/css/rating.css"/>-->
<link rel="stylesheet" type="text/css" href="/{{=request.application}}/static/css/documentation.css"/>
<!--<link rel="stylesheet" type="text/css" href="/{{=request.application}}/static/css/jquery.rating.css"/>-->
<!--<link rel="stylesheet" type="text/css" href="/{{=request.application}}/static/css/avim.css"/>-->



{{import os
if os.path.exists(os.path.join(request.folder,'static','ui.datepicker.js')):}}
<link rel="stylesheet" href="/{{=request.application}}/static/css/ui.datepicker.css" type="text/css" media="screen" title="core css file" charset="utf-8" />
<script src="/{{=request.application}}/static/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>
{{pass}}
<script type="text/javascript"><!--
/* Written by Massimo Di Pierro. Here for backward compatibility. */
function popup(url) {
  newwindow=window.open(url,'name','height=400,width=600');
  if (window.focus) newwindow.focus();
  return false;
}
function collapse(id) { $('#'+id).slideToggle(); }
function fade(id,value) { if(value>0) $('#'+id).hide().fadeIn('slow'); else $('#'+id).show().fadeOut('slow'); }
function ajax(u,s,t) {
  var query="";
  for(i=0; i<s.length; i++) { if(i>0) query=query+"&";
     query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);
  }
  $.ajax({type: "POST", url: u, data: query, success: function(msg) { document.getElementById(t).innerHTML=msg; } });  
} 
String.prototype.reverse = function () {return this.split('').reverse().join('');};
$(document).ready(function() {
$('div.error').hide().slideDown('slow');
$('#flash').hide().slideDown('slow').attr('onclick','$(this).fadeOut();');
$('input.integer').attr('onkeyup',"this.value=this.value.reverse().replace(/[^0-9\-]|\-(?=.)/g,'').reverse();");
$('input.double').attr('onkeyup',"this.value=this.value.reverse().replace(/[^0-9\-\.]|[\-](?=.)|[\.](?=[0-9]*[\.])/g,'').reverse();");
try {$("input.date").datepicker({dateFormat: '{{=T('yy-mm-dd')}}'});} catch(e) {};
});
//--></script>

<script> 
$(function(){
 $('.hover-star').rating({
  focus: function(value, link){
    // 'this' is the hidden form element holding the current value
    // 'value' is the value selected
    // 'element' points to the link element that received the click.
    var tip = $('#hover-test');
    tip[0].data = tip[0].data || tip.html();
    tip.html(link.title || 'value: '+value);
  },
  blur: function(value, link){
    var tip = $('#hover-test');
    $('#hover-test').html(tip[0].data || '');
  }
 });
});
</script> 
<!-- YUI library for Text editor-->
<!-- Skin CSS file -->
<link rel="stylesheet" type="text/css" href="/{{=request.application}}/static/build/assets/skins/sam/skin.css">
<!-- Utility Dependencies -->
<script src="/{{=request.application}}/static/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
<script src="/{{=request.application}}/static/build/element/element-min.js"></script> 
<!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
<script src="/{{=request.application}}/static/build/container/container_core-min.js"></script>
<script src="/{{=request.application}}/static/build/menu/menu-min.js"></script>
<script src="/{{=request.application}}/static/build/button/button-min.js"></script>
<!-- Source file for Rich Text Editor-->
<script src="/{{=request.application}}/static/build/editor/editor-min.js"></script>
<!--<script>var myEditor = new YAHOO.widget.Editor('msgpost', {
	height: '100px',
	width: '600px',
	dompath: true, //Turns on the bar at the bottom
	animate: true, //Animates the opening, closing and moving of Editor windows
	handleSubmit: true
});
myEditor.render();
</script>
-->
<script>
var myEditor = new YAHOO.widget.Editor('msgpost', {
    height: '200px',
    width: '385px',
    dompath: false,
    animate: true,
	handleSubmit: true,
    toolbar: {
        titlebar: '',
        buttons: [
            { group: 'textstyle', label: 'Font Style',
                buttons: [
                    { type: 'push', label: 'Bold', value: 'bold' },
                    { type: 'push', label: 'Italic', value: 'italic' },
                    { type: 'push', label: 'Underline', value: 'underline' },
                    { type: 'separator' },
                    { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
                        menu: [
                            { text: 'Arial', checked: true },
                            { text: 'Arial Black' },
                            { text: 'Comic Sans MS' },
                            { text: 'Courier New' },
                            { text: 'Lucida Console' },
                            { text: 'Tahoma' },
                            { text: 'Times New Roman' },
                            { text: 'Trebuchet MS' },
                            { text: 'Verdana' }
                        ]
                    },
                    { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true },
                    { type: 'separator' },
                    { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
                    { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
                ]
            }
        ]
    }
});
myEditor.render();
</script>